﻿Public Class f_clientes
    Dim c As New Controlador
    Public alta_cli As Boolean = False

    Private Sub f_clientes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        c.muestra_clientes()
        dg_clientes.Columns(1).HeaderText = "Nombre"
        dg_clientes.Columns(2).HeaderText = "Apellidos"
        dg_clientes.Columns(3).HeaderText = "Telefono"
        dg_clientes.Columns(4).HeaderText = "Direccion"
        dg_clientes.Columns(5).HeaderText = "Email"
    End Sub

    Private Sub tb_b_nombre_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_nombre.TextChanged
        c.buscar_clientes()
    End Sub

    Private Sub tb_b_telefono_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_telefono.TextChanged
        c.buscar_clientes()
    End Sub

    Private Sub tb_b_apellidos_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_apellidos.TextChanged
        c.buscar_clientes()
    End Sub


    Private Sub dg_clientes_CellContentClick_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dg_clientes.CellContentClick
        Me.alta_cli = False
    End Sub


    Private Sub b_guardar_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
        c.guardar_f_clientes()
    End Sub

    Private Sub b_carnet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        AddHandler PrintDocument1.PrintPage, AddressOf c.imprimir
        PrintDocument1.Print()

    End Sub

    Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter

    End Sub

    Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter

    End Sub
End Class